package edu.sctu.zcy.month201506.day20150611;

import java.io.File;
import java.io.IOException;

/**
 * Created by user24 on 2015/6/11.
 */
public class FileDemo {

    public static void main(String[] args) throws IOException {

        File file = new File("D:\\ZCY\\zcy");
        File file1 = new File("D:\\ZCY\\zcy.txt");
       boolean result;

        if(!file.exists()) {

            result = file.mkdirs();

            if(result){
                System.out.println("成功创建目录");
                file1.createNewFile();
            }
        }else {
            System.out.println("目录已存在");
        }
    }



}
